@import './variables';

@import 'placeholder';
@import 'doc';
@import 'pagination';
@import './error.scss';

@import 'menu';
@import 'toc';
@import 'moment';
@import 'index';

// reset
// 防止自己撑大
* {
  margin: 0;
  padding: 0;
}

//重置图标大小？
// .svg-inline--fa {
//   width: auto !important;
// }

//界面防抖
html,
body {
  // font-family: 'EB Garamond', 'Noto Serif SC', 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
  //   'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
  -webkit-text-size-adjust: none;
  scroll-behavior: smooth;
  // 流畅的滚动
  word-break: break-all;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  flex-wrap: wrap;
  // height: 100%;
  :focus {
    outline: none;
  }
}

// 首页搜索输入框

.mysubmenu {
  // background-color: rgb(105, 105, 105);
  color: white;
}

.menucover {
  background-color: #000;
}

// ::-webkit-scrollbar {
//   width: 5px;
//   height: 5px;
// }

// ::-webkit-scrollbar-thumb {
//   background-color: #d5d5d5;
//   border-radius: 2px;
// }

// #app {
//   margin-right: calc(100% - 100vw);
// }

li {
  list-style-type: none;
  cursor: pointer;
}

.over-hidden {
  overflow: hidden;
}

.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
  display: none !important;
}

@media (max-width: 768px) {
  .sq-leftside-link {
    justify-content: space-around;
  }

  .visible-xs {
    display: block !important;
  }

  .xs {
    display: none !important;
  }
  .xs-flex-1 {
    flex: 1;
  }
  .xs-flex-wrap {
    flex-wrap: wrap;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .visible-sm {
    display: block !important;
  }
}

@media (max-width: 992px) {
  .xm {
    display: none !important;
  }
  .xm-flex-wrap {
    flex-wrap: wrap;
  }
  .visible-md {
    display: block !important;
  }
}

@media (max-width: 1200px) {
  .md {
    display: none !important;
  }
}

.el-avatar > img {
  object-fit: cover;
  width: 100%;
}

// 透明度
.opacity25 {
  opacity: 0.25;
}

@each $opacitykey, $opacity in $opacitys {
  .opacity#{$opacitykey} {
    opacity: $opacity;
  }
}
.relative {
  position: relative;
}

.absolute {
  position: absolute !important;
}

.inline-block {
  display: inline-block;
}
.fixed {
  position: fixed !important;
}

// 阴影
.shadow-1 {
  box-shadow: 0 1px 3px 0 rgba(0, 34, 77, 0.05);
  // border-bottom: 1px solid rgba(30, 35, 42, 0.06);
}

.shadow-2 {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

//第一个参数为键值及键名 第二个为对象
@each $colorkey, $color in $colors {
  .text-#{$colorkey} {
    color: $color;
  }
  .bg-#{$colorkey} {
    background-color: $color !important;
  }
}

//鼠标样式
.pointer {
  cursor: pointer;
}
// shadow
// box-shadow:
@each $var in (left, right, bottom, right) {
}

//字体样式
@each $fontkey, $font in $fonts {
  .font-#{$fontkey} {
    font-family: $font;
  }
}

// text align
//第一个参数为变量 第二个为集合
@each $var in (left, center, right, end) {
  .text-#{$var} {
    text-align: $var !important;
  }
}

@each $sizekey, $size in $font-sizes {
  .fs-#{$sizekey} {
    font-size: $size * $base-font-size !important;
  }
}

@each $sizekey, $size in $line-height {
  .lh-#{$sizekey} {
    line-height: $size * $base-line-height;
  }
}
// width heigh
.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.w-100 {
  width: 100%;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.showoff {
  display: none;
}

@each $key, $value in $flex-jc {
  .jc-#{$key} {
    justify-content: $value;
  }
}

@each $key, $value in $flex-ai {
  .ai-#{$key} {
    align-items: $value;
  }
}

.flex-1 {
  flex: 1;
}
// 占满整个盒子
.flex-1 {
  flex-grow: 1;
}

// 三层循环嵌套
// m-0 ,mx-0
// @each $typeKey, $type in $spacing-types {
//   // .m-1{ margin:0.25rem}
//   @each $sizekey, $size in $spacing-sizes {
//     // .mt-1{ margin-top:0.25rem}
//     .#{$typeKey}-#{$sizekey} {
//       #{$type}: $size * $spacing-base-size;
//     }
//   }
//   // .mx-1
//   @each $sizekey, $size in $spacing-sizes {
//     // .mt-1{ margin-top:0.25rem}
//     .#{$typeKey}x-#{$sizekey} {
//       #{$type}-left: $size * $spacing-base-size;
//       #{$type}-right: $size * $spacing-base-size;
//     }
//   }
//   // .my-1
//   @each $sizekey, $size in $spacing-sizes {
//     // .mt-1{ margin-top:0.25rem}
//     .#{$typeKey}y-#{$sizekey} {
//       #{$type}-top: $size * $spacing-base-size;
//       #{$type}-bottom: $size * $spacing-base-size;
//     }
//   }

//   @each $directionKey, $direction in $spacing-directions {
//     @each $sizekey, $size in $spacing-sizes {
//       // .mt-1{ margin-top:0.25rem}
//       .#{$typeKey}#{$directionKey}-#{$sizekey} {
//         #{$type}-#{$direction}: $size * $spacing-base-size;
//       }
//     }
//   }
// }

//borders
@each $dir in (top, right, bottom, left) {
  .border-#{$dir} {
    border-#{$dir}: 1px solid $border-color;
  }
}

.blur {
  filter: blur(5px);
}

h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.5rem;
  // font-weight: 500;
  line-height: 1.5;
}

.canavas {
  width: 100%;
}

code {
  -webkit-overflow-scrolling: auto !important;
}

.v-application ul,
.v-application ol {
  padding-left: 0px;
}
.v-treeview-node__level {
  width: 18px;
}
.v-treeview-node__content {
  align-items: unset;
}

.v-navigation-drawer {
  z-index: 50;
}

.v-menu__content {
  z-index: 204 !important;
}

a {
  text-decoration: none !important;
}

hr {
  margin: 1.2em auto !important;
}
.v-application code {
  color: #333;
}
.v-application code,
.v-application kbd {
  font-weight: normal !important;
}

//################## 首页搜索栏的css

.theme--light.v-list-item .v-list-item__mask {
  color: #008eff;
  background: none;
  font-weight: 700;
}

.theme--light.v-list-item:hover::before {
  opacity: 0.15;
  border-radius: 4px;
}

.v-menu__content.theme--light.menuable__content__active.v-autocomplete__content {
  max-width: 300px;
}

div[role='listbox'].v-list.v-select-list.v-sheet.theme--light.theme--light {
  backdrop-filter: blur(3px);
  background-color: rgb(0 0 0 / 44%);
  color: white !important;
}

div[role='listbox'] .theme--light.v-list-item:not(.v-list-item--active):not(.v-list-item--disabled) {
  color: white !important;
}

.v-menu__content {
  will-change: auto;
}
// ######################
#domain .v-treeview--dense .v-treeview-node__root {
  min-height: 35px !important;
}
#domain .v-treeview-node__content span {
  font-size: 0.9em !important;
}
